
package com.sl.au.controller;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.baidu.ueditor.ActionEnter;
import com.sl.au.entity.BussinessContent;
import com.sl.au.entity.BussinessInspection;
import com.sl.au.entity.BussinessLevel;
import com.sl.au.entity.User;
import com.sl.au.service.BussinessContentService;
import com.sl.au.service.BussinessLevelService;
import com.sl.utils.MsgHelper;


/**
 * 百度编辑器Controller
 * 
 * @author yangdi
 *
 */

@RestController
@RequestMapping(value = "/ui/ueditor")
public class UEController extends BaseController {

	@Autowired
	BussinessLevelService bussinessLevelService;
	
	@Autowired
	BussinessContentService bussinessContentService;
	
	@RequestMapping(value = "/controller", method = {RequestMethod.POST,RequestMethod.GET})
	public String controller(HttpServletRequest request, HttpServletResponse response){
		response.setContentType("application/json");  
        String rootPath = request.getSession().getServletContext().getRealPath("/");
		String json = new ActionEnter( request, rootPath ).exec();
		return json;
	}
	
}
